#ifndef _PWM_H
#define _PWM_H

#define PWM_AF_PORT     AFIO_PORT(B)
#define PWM_AF_PIN      AFIO_PIN(0)
#define PWM_AF_PIN_N    AFIO_PIN(1)
#define PWM_CH          TM_CH_1

#define  PWM_frequency                               (1000)//1000Hz

#define  PWM_TM_RELOAD                               (SystemCoreClock/PWM_frequency)
#define  PWM_TM_DEAD_TIME                            (72)

#define  PWM_MAX                                     (1000)
#define  PWM_CONST                                   (PWM_TM_RELOAD/PWM_MAX)

void pwm_init(void);
void pwm_output_set(u32 num);
void pwm_proc(void);

#endif
